# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mptcp
pkgver=1.9.0
pkgrel=2
groups=('blackarch' 'blackarch-networking')
pkgdesc='A tool for manipulation of raw packets that allows a large number of options.'
arch=('x86_64' 'aarch64')
url='http://packetstormsecurity.com/files/119132/Mptcp-Packet-Manipulator-1.9.0.html'
license=('GPL3')
depends=('libpcap')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/$pkgname-$pkgver.tar.gz")
sha512sums=('490175769a8bb5327c2fbf7a806574fe21bc7c9a36b3c7ca93c8d6692ae658db27e20a0b3782f0297625d79a8d2401e8c74fc23b21b7e9c5f7c0266287e4ebda')

build() {
  cd "MpTcp-$pkgver"

  make
}

package() {
  cd "MpTcp-$pkgver"

  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  cd docs

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" ../INSTALL CHANGELOG \
    TODO "$pkgname.txt"
  install -Dm 644 "$pkgname.8.gz" "$pkgdir/usr/share/man8/$pkgname.8.gz"
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"

  cd ..

  install -Dm 755 "bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

